#include "Node.h"

Node::Node(int x,int y,int z,int cost,Node *parent)
{
	SetAll(x,y,z,cost,parent);
}

Node::~Node()
{
}

void Node::SetAll(Node *n)
{
	m_x = n->GetX();
	m_y = n->GetY();
	m_z = n->GetZ();
	m_parent = n->GetParent();
}

void Node::SetAll(int x,int y,int z,int cost,Node *parent)
{
	m_x = x;
	m_y = y;
	m_z = z;
	m_cost = cost;
	m_parent = parent;
}

void Node::Print()
{
	int px=0,py=0;
	if(m_parent!=NULL)
	{
		px = m_parent->GetX();
		py = m_parent->GetY();
	}
	printf("x=%d y=%d cost=%d xparent=%d yparent=%d\n",m_x,m_y,m_cost,px,py);
}